using System;
using System.Collections.Generic;
using System.Windows.Forms;
using SpriteCraft;

namespace SpaceGame
{
  static class Program
  {
    private static Engine m_Engine;
    private static Model m_Model;
    public static int PlayerCollideGroup = 1;
    public static int EnemyCollideGroup = 2;

    public static int PlayerShipCollideGroup = (int)SpriteCraft.tagCollideGroup.CollideActive + PlayerCollideGroup;
    public static int EnemyShipCollideGroup = (int)SpriteCraft.tagCollideGroup.CollideActive + EnemyCollideGroup;
    public static int PlayerShotCollideGroup = (int)SpriteCraft.tagCollideGroup.CollidePassive + PlayerCollideGroup;

    [STAThread]
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);

      m_Engine = new SCEngine();
      m_Engine.Init();

      Run();
    }

    public static void Restart()
    {
      m_Model = null;

      Run();
    }

    public static void Run()
    {
      EngineClass engine = m_Engine.GetEngine();
      engine.AllowCollide(PlayerCollideGroup, EnemyCollideGroup);

      m_Model = new Model(engine);
      m_Engine.Run();
    }
  }
}